﻿using System;
using System.Xml.Linq;

namespace CodeCounsel.SharePoint.RibbonDesigner.Model
{
    [XName("OverflowSection", Namespaces.CommandUIText)]
    public class OverflowSection
        : DomainElement
    {
        public DisplayMode DisplayMode
        {
            get { return DataModel.GetAttributeValue<DisplayMode>(Schema.DisplayMode); }
            set { DataModel.SetAttributeValue<DisplayMode>(Schema.DisplayMode, value); }
        }

        public string TemplateAlias
        {
            get { return DataModel.GetAttributeValue(Schema.TemplateAlias); }
            set { DataModel.SetAttributeValue(Schema.TemplateAlias, value); }
        }

        public string DividerAfter
        {
            get { return DataModel.GetAttributeValue(Schema.DividerAfter); }
            set { DataModel.SetAttributeValue(Schema.DividerAfter, value); }
        }

        public string DividerBefore
        {
            get { return DataModel.GetAttributeValue(Schema.DividerBefore); }
            set { DataModel.SetAttributeValue(Schema.DividerBefore, value); }
        }

        public SectionType Type
        {
            get { return DataModel.GetAttributeValue<SectionType>(Schema.Type); }
            set { DataModel.SetAttributeValue<SectionType>(Schema.Type, value); }
        }

        public OverflowSection(XElement dataModel, DomainModelSource source)
            : base(dataModel, source)
        {
        }

        public OverflowSection()
        {
        }
	}
}
